<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div></div>
    <div></div>
    <div></div>
    <script>
        let divs = document.querySelectorAll('div');

        // console.log(divs);

        // 伪数组-真数组
        // let arr = [...divs];

        // console.log(arr);

        // Array.from();

        // let arr2 = Array.from(divs);

        // console.log('arr2',arr2);

        // new Array();

        let arr = [1,2,3];
        // let arr2 = new Array(3); //[empty,empty,empty];
        // let arr2 = new Array(3,2,1); //[3, 2, 1]

        // 解决了new Array 传参个数不同导致的意义差异。
        // 传参的意义：无论传几个值，都是数组的原始值
        // let arr2 = Array.of(3,2,1); 


        console.log(arr);
        console.log(arr2);

    </script>
</body>
</html>